Three Versions of FindFit

Three versions of FindFit can be used to minimize the largest absolute deviation, to minimize the sum of absolute deviations and to minimize the sum of squares of deviations.
                              
To find the best fit function that minimizes the sum of absolute deviations do the following.
               
FindFit[List of data points, Function type, List of parameters to be estimated, List of independent variables, NormFunction -> (Norm[#, 1] &)]
               
For example, to find the best fit function of the form f (x) = ax + b for data set called data which minimizes the the sum of absolute deviations, input the following.
               
FindFit[data, {a x + b}, {a, b}, {x}, NormFunction -> (Norm[#, 1] &)]
               
To find the best fit function that minimizes the largest absolute deviation, Chebyshev model, do the following.
               
FindFit[List of data points, Function type, List of parameters to be estimated, List of independent variables, NormFunction -> (Norm[#, Infinity] &)]
               
For example, to find the best fit function of the form f (x) = ax + b for data set called data which minimizes the largest absolute deviation, input the following.
               
FindFit[data, {a x + b}, {a, b}, {x}, NormFunction -> (Norm[#, Infinity] &)]              
               
To find the best fit function that minimizes the sum of squares of deviations do the following.
               
FindFit[List of data points, Function type or variables, List of parameters to be estimated, List of independent variables]   (Note: This is the most common way of fitting data.)
          
For example, one way to find the best fit function of the form f (x) = ax + b for data set called data which minimizes the the sum of absolute deviations, input the following.
          
FindFit[data, {a x + b}, {a, b}, {x}]     (Note: Can us x in place of {x}.)
     
Another way to find the best fit function of the form f (x) = ax + b for data set called data which minimizes the the sum of absolute deviations, input the following.
     
Fit[data, {1, x}, {x}]     (Note: Notice that Fit command is sufficient.)

In the above, {1, x} represents a function of a constant and variable x: a linear function.

Below is a demonstration of the above commands and their comparison. It also includes least-squares regression line using the transformed data.

xvalues={0.5,1,1.5,2,2.5};
yvalues={0.7,3.4,7.2,12.4,20.1};
data=Transpose[{xvalues,yvalues}];
ListPlot[data]
loglogdata=Transpose[{Log[xvalues],Log[yvalues]}];
ListPlot[loglogdata]
FindFit[data,{a x^2},{a},x,NormFunction->(Norm[#,1]&)]
FindFit[data, {a x^2},{a},x,NormFunction->(Norm[#,Infinity]&)]
FindFit[data,{ a x^2},{a},{x}]
Fit[data,{ x^2},{x}]
FindFit[loglogdata,{b+2Log[x]},{b},Log[x]]
E^(b/. %)

minabssummodel[x_]:=3.216 x^2
minmaxmodel[x_]:=3.17073 x^2
lsr[x_]:=3.18693 (x^2)
tlsr[x_]:=3.13684 (x^2)

sumabsdevtable=Table[Total[Abs[yvalues-func[xvalues]]],{func, {minabssummodel,minmaxmodel,lsr,tlsr}}];
TableForm[sumabsdevtable]

Notice that the first row above shows that minabssummodel has the minimum sum of absolute deviations.

absdevtable=Table[Abs[yvalues-func[xvalues]],{func, {minabssummodel,minmaxmodel,lsr,tlsr}}];
TableForm[absdevtable]

Notice that the second row above shows that minmaxmodel has the minimum maximum absolute deviation.

sumofsquaresdevtable=Table[Total[(yvalues-func[xvalues])^2],{func, {minabssummodel,minmaxmodel,lsr,tlsr}}];
TableForm[sumofsquaresdevtable]

Notice that the third row above shows that lsr, leaset-squres regression line, has the minimum sum of squares of deviations.